# -*- coding: utf-8 -*-
# @Time : 2023-12-18
# @Author : shiratama
# @Site : 
# @File : services/menu.py
# @Function: select menu
# @Describe: ---
import webbrowser
import os
from .dataServices.dataServicesMain import dataServicesMain

class menu:
    # welcome page(main)
    def welcome(self,instructValue):
        if instructValue=='data':
            dataServicesMain()
            pass
        elif instructValue=='backups':
            current_dir = os.path.dirname(os.path.abspath(__file__))
            file_path = os.path.join(current_dir, 'index.html')
            url = './index.html'  # 替换为你想要打开的页面 URL
            print("已打开页面【https://www.wuhupoo.cn】，如无响应请手动打开")
            # 打开默认浏览器并访问 URL
            webbrowser.open(f'file://{file_path}')
            pass
        elif instructValue=='cloud':
            pass
        elif instructValue=='history':
            pass
        else: return -1